const { redis } = require('./connect');

function setAccessToken(access_token, expires_in) {
  return redis.set('G_battlenet_access_token', access_token, 'EX', expires_in)
}

function getAccessToken() {
  return redis.get('G_battlenet_access_token')
}

module.exports = {
  AccessToken: {
    set: setAccessToken,
    get: getAccessToken,
  }
}